package language.basic;

//数组可变参数的使用
public class VarargsTest {
    public static int func(int... args){
        int ret = 1;
        for(int i:args)  ret *= i;
        return ret;
    }

    public static void main(String[] args){
        System.out.println(func(1,2,3));
        System.out.println(func(2,2,2,2,2,2));
        System.out.println(func(100,1000));
    }
}
